package TEdit::ModuleCheck;


use strict;
use warnings qw( all );

sub check {
	my @modules = qw(
		Audio::FLAC::Header
		Curses::UI
		File::Find::Rule
	);

	my @missing;

	foreach my $module (@modules) {
		eval("require $module; 1;");

		if($@) {
			push(@missing,$module);
		}
	}

	if(@missing) {
	
		print STDERR "Certain required perl module(s) ".
			"not found.\nProgram must now exit.\n\n";
		print STDERR "Missing modules:\n";
		print STDERR "\t$_\n" foreach (@missing);
		exit(128);
	}
}

1;

__END__
